{{if .Comment}}
<section id="comment">
    {{if .Comment.Disqus}}<div class="row">
        <div class="col-md-10 col-md-offset-1">
            <div id="disqus_thread"></div>
            <script>
                (function () {
                    var d = document, s = d.createElement('script');
                    s.src = '//{{.Comment.Disqus}}.disqus.com/embed.js';
                    s.setAttribute('data-timestamp', +new Date());
                    (d.head || d.body).appendChild(s);
                })();
            </script>
            <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments
                powered by Disqus.</a></noscript>
        </div>
    </div>{{end}}
    {{if .Comment.Duoshuo}}<div class="row">
        <div class="col-md-10 col-md-offset-1">
            <div class="ds-thread" data-thread-key="{{.PermaKey}}" data-title="{{.Title}}" data-url="{{.Root}}{{.URL}}"></div>
            <script type="text/javascript">
                var duoshuoQuery = {short_name:"{{.Comment.Duoshuo}}"};
                (function() {
                    var ds = document.createElement('script');
                    ds.type = 'text/javascript';ds.async = true;
                    ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
                    ds.charset = 'UTF-8';
                    (document.getElementsByTagName('head')[0]
                    || document.getElementsByTagName('body')[0]).appendChild(ds);
                })();
            </script>
        </div>
    </div>{{end}}
</section>
{{end}}